package com.tm.hutool.main;

import com.tm.hutool.entity.Student;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

/**
 * @author zyl
 * @create 2022-08-17 23:04
 */
public class main {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, InvocationTargetException {
        Class<Student> studentClass = Student.class;
        Constructor<?>[] constructors = studentClass.getConstructors();
        for (Constructor<?> constructor : constructors) {

         //Student  o = (Student) constructor.newInstance();
            Student o =(Student) constructor.newInstance(String.class, int.class);
            System.out.println(o);

        }



    }
}
